<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>盒子大小</title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#d1{
				height: 400px;
				width: 200px;
				border: 1px solid red;
				background-color: aquamarine;
				overflow: auto;/*盒子撑破的处理*/
				padding: 2px;/*不包含在宽和高中，被背景色覆盖*/
			}
			#d2{
				height: 400px;
				width: 200px;
				border: 1px solid red;
				background-color: aquamarine;
				overflow: auto;/*盒子撑破的处理*/
				padding: 2px;
				box-sizing: border-box;
			}
		</style>
	</head>
	<body>
		<div id="d1">
			<img src="../image/kongzi.jpg"/>
		</div>
		<div id="d2">
			<img src="../image/kongzi.jpg"/>
		</div>
	</body>
</html>